/*
 * @Version: 0.0.1
 * @Author: ider
 * @Date: 2020-07-26 00:15:18
 * @LastEditors: ider
 * @LastEditTime: 2021-03-01 22:53:00
 * @Description:
 */

package main

import (
	"flag"

	"lottery-zero/external/award/lottery"
	"lottery-zero/external/award/ssq"
	"lottery-zero/external/database"

	"lottery-zero/internal/config"

	"github.com/tal-tech/go-zero/core/conf"
)

// Mode 任务选择
var Mode = flag.Int("mode", 0, "Input mode 1,500 彩票网 双色球 all update")
var configFile = flag.String("f", "etc/lottery-zero-api.yaml", "the config file")

func init() {
	flag.Parse()
}
func main() {

	var c config.Config
	conf.MustLoad(*configFile, &c)
	database.NewLuckDBConn(c.Pgdns)

	switch *Mode {
	case 1:
		ssq.NewDoubleBollAll()
		lottery.NewChecker()
	}
}
